Public Class Lookups
    Inherits DABase

    Protected Overrides Function getDeleteCommand() As System.Data.SqlClient.SqlCommand
        Dim sqlCommand As New SqlClient.SqlCommand

        sqlCommand.CommandText = "[LookupDeleteCommand]"
        sqlCommand.CommandType = System.Data.CommandType.StoredProcedure
        sqlCommand.Connection = Me.Connection
        sqlCommand.Transaction = Me.Transaction

        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, False, CType(0, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_LK_ID_PK", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "LK_ID_PK", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_CATEGORY_NAME", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "CATEGORY_NAME", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_DATA_TYPE1", System.Data.SqlDbType.TinyInt, 1, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "DATA_TYPE1", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_DATA_TYPE2", System.Data.SqlDbType.TinyInt, 1, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "DATA_TYPE2", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_DATA_TYPE3", System.Data.SqlDbType.TinyInt, 1, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "DATA_TYPE3", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_IS_REQUIRED1", System.Data.SqlDbType.Bit, 1, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "IS_REQUIRED1", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_IS_REQUIRED2", System.Data.SqlDbType.Bit, 1, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "IS_REQUIRED2", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_IS_REQUIRED3", System.Data.SqlDbType.Bit, 1, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "IS_REQUIRED3", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_IS_UNIQUE1", System.Data.SqlDbType.Bit, 1, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "IS_UNIQUE1", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_IS_UNIQUE2", System.Data.SqlDbType.Bit, 1, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "IS_UNIQUE2", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_IS_UNIQUE3", System.Data.SqlDbType.Bit, 1, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "IS_UNIQUE3", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_MAX_LENGTH1", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "MAX_LENGTH1", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_MAX_LENGTH2", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "MAX_LENGTH2", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_MAX_LENGTH3", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "MAX_LENGTH3", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_MIN_LENGTH1", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "MIN_LENGTH1", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_MIN_LENGTH2", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "MIN_LENGTH2", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_MIN_LENGTH3", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "MIN_LENGTH3", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_TITLE1", System.Data.SqlDbType.VarChar, 30, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "TITLE1", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_TITLE2", System.Data.SqlDbType.VarChar, 30, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "TITLE2", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_TITLE3", System.Data.SqlDbType.VarChar, 30, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "TITLE3", System.Data.DataRowVersion.Original, Nothing))

        Return sqlCommand
    End Function

    Protected Overrides Function getInsertCommand() As System.Data.SqlClient.SqlCommand
        Dim sqlCommand As New SqlClient.SqlCommand

        sqlCommand.CommandText = "[LookupInsertCommand]"
        sqlCommand.CommandType = System.Data.CommandType.StoredProcedure
        sqlCommand.Connection = Me.Connection
        sqlCommand.Transaction = Me.Transaction

        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, False, CType(0, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@LK_ID_PK", System.Data.SqlDbType.Int, 4, "LK_ID_PK"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@CATEGORY_NAME", System.Data.SqlDbType.VarChar, 50, "CATEGORY_NAME"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@TITLE1", System.Data.SqlDbType.VarChar, 30, "TITLE1"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@DATA_TYPE1", System.Data.SqlDbType.TinyInt, 1, "DATA_TYPE1"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@MIN_LENGTH1", System.Data.SqlDbType.Int, 4, "MIN_LENGTH1"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@MAX_LENGTH1", System.Data.SqlDbType.Int, 4, "MAX_LENGTH1"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@IS_REQUIRED1", System.Data.SqlDbType.Bit, 1, "IS_REQUIRED1"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@IS_UNIQUE1", System.Data.SqlDbType.Bit, 1, "IS_UNIQUE1"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@TITLE2", System.Data.SqlDbType.VarChar, 30, "TITLE2"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@DATA_TYPE2", System.Data.SqlDbType.TinyInt, 1, "DATA_TYPE2"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@MIN_LENGTH2", System.Data.SqlDbType.Int, 4, "MIN_LENGTH2"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@MAX_LENGTH2", System.Data.SqlDbType.Int, 4, "MAX_LENGTH2"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@IS_REQUIRED2", System.Data.SqlDbType.Bit, 1, "IS_REQUIRED2"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@IS_UNIQUE2", System.Data.SqlDbType.Bit, 1, "IS_UNIQUE2"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@TITLE3", System.Data.SqlDbType.VarChar, 30, "TITLE3"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@DATA_TYPE3", System.Data.SqlDbType.TinyInt, 1, "DATA_TYPE3"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@MIN_LENGTH3", System.Data.SqlDbType.Int, 4, "MIN_LENGTH3"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@MAX_LENGTH3", System.Data.SqlDbType.Int, 4, "MAX_LENGTH3"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@IS_REQUIRED3", System.Data.SqlDbType.Bit, 1, "IS_REQUIRED3"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@IS_UNIQUE3", System.Data.SqlDbType.Bit, 1, "IS_UNIQUE3"))

        Return sqlCommand
    End Function

    Protected Overrides Function getSelectCommand(ByVal keys() As Object) As System.Data.SqlClient.SqlCommand
        Dim sqlCommand As New SqlClient.SqlCommand
        sqlCommand.CommandText = "[LookupSelectCommand]"
        sqlCommand.CommandType = System.Data.CommandType.StoredProcedure
        sqlCommand.Connection = Me.Connection

        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, False, CType(0, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))

        Dim Param As SqlParameter
        Param = New System.Data.SqlClient.SqlParameter("@LK_ID_PK", System.Data.SqlDbType.Int, 4, "LK_ID_PK")
        Param.Value = keys(0)
        sqlCommand.Parameters.Add(Param)

        Return sqlCommand
    End Function

    Protected Overrides Function getUpdateCommand() As System.Data.SqlClient.SqlCommand
        Dim sqlCommand As New SqlClient.SqlCommand

        sqlCommand.CommandText = "[LookupUpdateCommand]"
        sqlCommand.CommandType = System.Data.CommandType.StoredProcedure
        sqlCommand.Connection = Me.Connection
        sqlCommand.Transaction = Me.Transaction

        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, False, CType(0, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@LK_ID_PK", System.Data.SqlDbType.Int, 4, "LK_ID_PK"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@CATEGORY_NAME", System.Data.SqlDbType.VarChar, 50, "CATEGORY_NAME"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@TITLE1", System.Data.SqlDbType.VarChar, 30, "TITLE1"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@DATA_TYPE1", System.Data.SqlDbType.TinyInt, 1, "DATA_TYPE1"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@MIN_LENGTH1", System.Data.SqlDbType.Int, 4, "MIN_LENGTH1"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@MAX_LENGTH1", System.Data.SqlDbType.Int, 4, "MAX_LENGTH1"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@IS_REQUIRED1", System.Data.SqlDbType.Bit, 1, "IS_REQUIRED1"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@IS_UNIQUE1", System.Data.SqlDbType.Bit, 1, "IS_UNIQUE1"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@TITLE2", System.Data.SqlDbType.VarChar, 30, "TITLE2"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@DATA_TYPE2", System.Data.SqlDbType.TinyInt, 1, "DATA_TYPE2"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@MIN_LENGTH2", System.Data.SqlDbType.Int, 4, "MIN_LENGTH2"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@MAX_LENGTH2", System.Data.SqlDbType.Int, 4, "MAX_LENGTH2"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@IS_REQUIRED2", System.Data.SqlDbType.Bit, 1, "IS_REQUIRED2"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@IS_UNIQUE2", System.Data.SqlDbType.Bit, 1, "IS_UNIQUE2"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@TITLE3", System.Data.SqlDbType.VarChar, 30, "TITLE3"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@DATA_TYPE3", System.Data.SqlDbType.TinyInt, 1, "DATA_TYPE3"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@MIN_LENGTH3", System.Data.SqlDbType.Int, 4, "MIN_LENGTH3"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@MAX_LENGTH3", System.Data.SqlDbType.Int, 4, "MAX_LENGTH3"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@IS_REQUIRED3", System.Data.SqlDbType.Bit, 1, "IS_REQUIRED3"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@IS_UNIQUE3", System.Data.SqlDbType.Bit, 1, "IS_UNIQUE3"))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_LK_ID_PK", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "LK_ID_PK", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_CATEGORY_NAME", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "CATEGORY_NAME", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_DATA_TYPE1", System.Data.SqlDbType.TinyInt, 1, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "DATA_TYPE1", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_DATA_TYPE2", System.Data.SqlDbType.TinyInt, 1, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "DATA_TYPE2", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_DATA_TYPE3", System.Data.SqlDbType.TinyInt, 1, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "DATA_TYPE3", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_IS_REQUIRED1", System.Data.SqlDbType.Bit, 1, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "IS_REQUIRED1", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_IS_REQUIRED2", System.Data.SqlDbType.Bit, 1, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "IS_REQUIRED2", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_IS_REQUIRED3", System.Data.SqlDbType.Bit, 1, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "IS_REQUIRED3", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_IS_UNIQUE1", System.Data.SqlDbType.Bit, 1, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "IS_UNIQUE1", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_IS_UNIQUE2", System.Data.SqlDbType.Bit, 1, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "IS_UNIQUE2", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_IS_UNIQUE3", System.Data.SqlDbType.Bit, 1, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "IS_UNIQUE3", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_MAX_LENGTH1", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "MAX_LENGTH1", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_MAX_LENGTH2", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "MAX_LENGTH2", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_MAX_LENGTH3", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "MAX_LENGTH3", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_MIN_LENGTH1", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "MIN_LENGTH1", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_MIN_LENGTH2", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "MIN_LENGTH2", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_MIN_LENGTH3", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "MIN_LENGTH3", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_TITLE1", System.Data.SqlDbType.VarChar, 30, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "TITLE1", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_TITLE2", System.Data.SqlDbType.VarChar, 30, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "TITLE2", System.Data.DataRowVersion.Original, Nothing))
        sqlCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_TITLE3", System.Data.SqlDbType.VarChar, 30, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "TITLE3", System.Data.DataRowVersion.Original, Nothing))

        Return sqlCommand
    End Function
End Class
